package com.improve.frame.redis.lock;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description 锁对象抽象
 * @Author wzxing918
 * @Date 2021-03-31
 * @Version 1.0.0
 **/
@AllArgsConstructor
public class WzxLock implements AutoCloseable {
    @Getter
    private final Object lock;

    private final DistributedLock locker;

    @Override
    public void close() throws Exception {
        locker.unlock(lock);
    }
}
